package com.cogwheel.framework.util.input;

import javax.media.opengl.awt.GLCanvas;

public class CKeyboard {
	private CKeyboardListener mainListener = new CKeyboardListener();
	public void CRegisterListener(GLCanvas canvas){ canvas.addKeyListener(mainListener); }
	public void CUnregisterListener(GLCanvas canvas){ canvas.removeKeyListener(mainListener); }
	public void CClearKeyBuffer(){ mainListener.keyBuffer = ""; mainListener.charBuffer = ' '; }
	public String CGetKeyBuffer(){ return mainListener.keyBuffer; }
	public char CGetKeychar(){ return mainListener.charBuffer; }
	public void CSetState(CKeyboardState state){ mainListener.keyState = state; }
	public CKeyboardState CGetState(){ return mainListener.keyState; }
	public CKeyboardState CWGGetKeyboardState(){ return mainListener.keyState; }
}
